package com.haiya.flyweight.basic;

public class ConcreteFlyweight1 implements Flyweight {
    private String key;

    public ConcreteFlyweight1(String key) {
        this.key = key;
        System.out.println("具体享元" + key + "被创建~~~~");
    }

    @Override
    public void update(UnsharedConcreteFlyweight state) {
        System.out.println("具体享元" + key + "被调用~~~~");
        System.out.println("非享元信息是: " + state.getInfo());
    }
}
